Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WI00737678---RemoveDragNodesBehavior #43

Merged
merged 6 commits into from
Jul 11, 2024

Conversation

gnawisetech
Copy link

WI00737678---RemoveDragNodesBehaviorUpdates

Comment on lines 13 to 18
public record NodeMoveablePositions(Point position)
{
public Dictionary<NodeModel, DiagramPoint> ChildPositions { get; } = new();
}

protected readonly Dictionary<NodeModel, NodeMoveablePositions> _initialPositions;
Copy link

@Heathermcx Heathermcx Jul 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we have some misunderstanding from yesterday. We should not add ChildPositions in Blazor.Diagrams, I thought we will just make _initialPositions protected so that we can reuse it in our implementation. Is there a solution where we use _initialPositions with the type Dictionary<MovableModle, Point> from this base class in our implementation?

Suggested change
public record NodeMoveablePositions(Point position)
{
public Dictionary<NodeModel, DiagramPoint> ChildPositions { get; } = new();
}
protected readonly Dictionary<NodeModel, NodeMoveablePositions> _initialPositions;
protected readonly Dictionary<MovableModle, Point> _initialPositions;

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@gnawisetech gnawisetech requested a review from Heathermcx July 4, 2024 07:22
@@ -28,6 +27,8 @@ protected override void OnPointerDown(Model? model, PointerEventArgs e)
if (model is not MovableModel)
return;

ResetPan();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't add this to Blazor.Diagrams - this means that every time I try to drag a node, the diagram view is repositioned to 0,0 even if I have panned the diagram. This makes it really hard to drag the node and also changes the users view without them trying to change view.

@gnawisetech gnawisetech requested a review from Heathermcx July 9, 2024 03:19
@gnawisetech gnawisetech merged commit 5082e89 into master Jul 11, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants